Vpa.doc.Property = function(cmt){
    var type = this.getType(cmt),
        name = this.getName(cmt),
        description = this.getDesc(cmt);
    Vpa.apply(this,{
        type : type,
        isPrivate : !!cmt.getTag("private"),
        isIgnore : !!cmt.getTag("ignore"),
        shortDesc : description.getShort(),
        description : description,
        name : name,
        isStatic : !!cmt.getTag("static"),
        href : cmt.sourceHref,
        html_filename : cmt.sourceFileName
    });
};

Vpa.doc.Property.prototype = {
    getType : function(cmt){
        var tag = cmt.getTag("type");
        if(tag){
            return tag.type;
        }else
            return null;
    },
    _RegExp_fun_info :
        /\s*\S+?(?=[\s:=;])\s*[:=;]?\s*\S*?(?=[\s:=;\(])/
    ,
    getName : function(cmt){
        var tag = cmt.getTag("property");
        if(tag && tag.propertyName.length>0){
            return tag.propertyName;
        }
        //guess what the property-name is;
        if(this._RegExp_fun_info.test(cmt.sourceCode.trim())){
            var str1 = RegExp.$1,
                str2 = RegExp.$2;
            if(str1 != 'var')
                return str1.substring(str1.lastIndexOf('.')+1);
            else
                return str2;
        }
        return '';
    },
    getDesc : function(cmt){
        var tag = cmt.getTag("property"),
            desc = '';
        if(tag && tag.description.length>0)
            desc = tag.description;
        if(desc.length<=0)
            desc = cmt.description;
        return desc;
    }
}
